{
  "name"    : "Simulator (export) config",
  
  "let" :
  {
    "QOOXDOO_PATH" : "../..",
    "CACHE"        : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
    "SIMULATOR_ROOT" : ".",
    "BUILD_PATH"      : "${ROOT}/simulator",
    "SIMULATION_NAMESPACE" : "${APPLICATION}.simulation",
    "SIMULATION_INCLUDE" : "${SIMULATION_NAMESPACE}.*",
    "SIMULATOR_CLASSPATH" : ["${SIMULATOR_ROOT}/tool/js.jar", "${SIMULATOR_ROOT}/tool/selenium-java-client-driver.jar"],
    "SIMULATOR_APPLICATION" : "simulator.Application",
    "TESTRUNNER_VIEW" : "testrunner.view.Basic"
  },
  
  "jobs" :
  {
    "simulator-common" :
    {
      "extend" : ["cache", "libraries"],
      
      "config-warnings" :
      {
        "exclude" : [
          "qx.core.Init",
          "qx.dev.Debug"
        ]
      },
      
      "library" :
      [
        {
          "manifest" : "${QOOXDOO_PATH}/component/simulator/Manifest.json",
          "uri" : "${QOOXDOO_PATH}/component/simulator"
        },
        {
          "manifest" : "${QOOXDOO_PATH}/component/testrunner/Manifest.json",
          "uri" : "${QOOXDOO_PATH}/component/testrunner"
        }
      ],
      
      "include" : [
        "qx.core.BaseInit",
        "${SIMULATOR_APPLICATION}",
        "${TESTRUNNER_VIEW}",
        "${SIMULATION_INCLUDE}"
      ],
      
      "exclude" : [
        "qx.core.Init",
        "qx.dev.Debug"
      ],
      
      "compile-options" :
      {
        "code" :
        {
          "except" : []
        },
        "paths" :
        {
          "loader-template" : "${QOOXDOO_PATH}/tool/data/generator/basic.loader.js",
          "app-root" : "${BUILD_PATH}"
        }
      },
      
      "environment" :
      {
        "qx.debug" : true,
        "qx.aspects" : false,
        "qx.version"     : "${QOOXDOO_VERSION}",
        "qx.revision"    : "${QOOXDOO_REVISION}",
        "qx.application" : "${SIMULATOR_APPLICATION}",
        "qx.testNameSpace" : "${SIMULATION_NAMESPACE}",
        "qx.globalErrorHandling" : false,
        "testrunner.view" : "${TESTRUNNER_VIEW}",
        "testrunner.testOrigin" : "internal"
      }
      
    },

    "build" :
    {
      "run" : ["build-script"]
    },

    "build-script" :
    {
      "extend" : [ "simulator-common" ],
      
      "environment" :
      {
        "qx.debug" : false
      },
      
      "compile-options" :
      {
        "code" :
        {
          "format"   : true,
          "optimize" : [ "basecalls", "privates" ]
        },
        
        "paths" :
        {
          "file" : "${BUILD_PATH}/script/simulator.js"
        }
      },
      
      "compile" : { "type" : "build" }
    },
    
    "source" :
    {
      "run" : ["source-script"]
    },
    
    "source-script" :
    {
      "extend" : [ "simulator-common" ],
      
      "environment" :
      {
        "qx.debug" : true
      },
      
      "compile-options" :
      {
        "code" :
        {
          "format"   : true,
          "optimize" : [],
          "except" : ["*"]
        },
        
        "paths" :
        {
          "file" : "${BUILD_PATH}/script/simulator-source.js",
          "app-root" : "."
        }
      },
      
      "compile" : { "type" : "source" }
    },

    "simulation-run" :
    {
      "extend"   : [ "cache" ],

      "simulate" : 
      {
        "java-classpath" : "${SIMULATOR_CLASSPATH}",
        "qxselenium-path" : "${SIMULATOR_ROOT}/tool",
        "rhino-class" : "org.mozilla.javascript.tools.shell.Main",
        "simulator-script" : "${BUILD_PATH}/script/simulator.js"
      },
      
      "environment" :
      {
        "simulator.selServer" : "localhost",
        "simulator.selPort" : 4444,
        "simulator.testBrowser" : "*firefox3",
        "simulator.autHost" : "http://localhost",
        "simulator.autPath" : "/${APPLICATION}/source/index.html",
        
        "simulator.logFile" : false,
        "simulator.globalErrorLogging" : false,
        "simulator.testEvents" : false,
        "simulator.applicationLog" : false,
        "simulator.disposerDebug" : false,
        "simulator.threadSafe" : false
      }
    },
    
    "simulation-run-source" :
    {
      "extend" : [ "simulation-run" ],
      
      "simulate" :
      {
        "simulator-script" : "${BUILD_PATH}/script/simulator-source.js"
      }
    }
  }
}
